package io.wit.modules.wit.service.impl;

import io.wit.modules.wit.dao.WorkingDao;
import io.wit.modules.wit.entity.WorkingEntity;
import io.wit.modules.wit.service.WorkingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;
import java.util.Map;



@Service("workingService")
public class WorkingServiceImpl implements WorkingService {
	@Autowired
	private WorkingDao workingDao;
	
	@Override
	public WorkingEntity queryObject(Long dataId){
		return workingDao.queryObject(dataId);
	}
	
	@Override
	public List<WorkingEntity> queryList(Map<String, Object> map){
		return workingDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return workingDao.queryTotal(map);
	}
	
	@Override
	public void save(WorkingEntity working){
		working.setCreateTime(new Date());
		workingDao.save(working);
	}
	
	@Override
	public void update(WorkingEntity working){
		workingDao.update(working);
	}
	
	@Override
	public void delete(Long dataId){
		workingDao.delete(dataId);
	}
	
	@Override
	public void deleteBatch(Long[] dataIds){
		workingDao.deleteBatch(dataIds);
	}
	
}
